package com.xyy.saas.payment.util;

import com.alibaba.dubbo.config.annotation.Reference;
import com.xyy.saas.leaf.cores.api.LeafApi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @author wangtianqi
 * @date 2019/11/28 16:25
 */
@Service
public class LeafUtil {

    private static final Logger LOGGER = LoggerFactory.getLogger(LeafUtil.class);

    @Reference(version = "1.0.0")
    private LeafApi leafApi;

    public String getSegmentId(String key) {
        return leafApi.getSegmentId(key);
    }

    public String getSnowflakeId(){
        return leafApi.getSnowflakeId();
    }

}